<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>伪元素选择器</title>
  <style>
    body,
    ul,
    li {
      margin: 0;
      padding: 0;
      list-style: none;
    }

    ul {
      overflow: hidden;
    }

    ul ::after {
      content: none;
      display: inline-block;
      clear: both;
    }

    ul li {
      float: left;
      margin: 10px;
    }


    ul li:hover {
      margin: 10px;
      /* 光标悬浮上去变手形 */
      cursor: pointer;
      color: deeppink;
      /* font-size: 20px; */
    }
  </style>
</head>

<body>
  <div>1</div>
  <ul>
    <li>首页</li>
    <li>新闻</li>
    <li>热点</li>
    <li>资讯</li>
    <li>生活</li>
    <li>娱乐</li>
  </ul>
  <div>2</div>
</body>

</html>